1. Field of the Invention
The present invention generally relates to graphics processing and more specifically to using a shared memory to store hardware-managed virtual buffers.
2. Description of the Related Art
Conventional graphics processors have processed primitives at a rate of up to one triangle per clock while maintaining the applications programming interface (API) specified primitive order. Graphics primitives, such as triangles are received in an ordered stream for processing. The DirectX and OpenGL APIs require that the primitive order be maintained, that is to say, the primitives must be rendered in the order presented by the application program. This requirement ensures that intersecting primitives will be rendered deterministically to avoid the introduction of visual artifacts. Additionally, the primitive order must be maintained since the results of rendering a later primitive may be dependent on the state of the frame buffer resulting from rendering an earlier primitive, particularly when blending is used.
While many graphics processors have used parallelism to increase processing throughput, systems capable of rendering more than one triangle per clock while processing from a single API input stream typically do not maintain primitive ordering at full speed. Processing of the primitives necessitates the transfer of primitive attributes between processing units and storage of processed primitive attributes for access by different processing units. The amount of data that must be stored is dependent on primitive sizes and rates and is highly variable. In large triangle cases it is small, but in small-primitive cases when the primitive rate is high it can be extremely large. It is wasteful to provide a large fixed buffer that is seldom needed, yet the buffering requirements must be met to sustain high primitive rates.
Accordingly, what is needed in the art is a system and method for storing processed attributes in a general-purpose cache, which can be advantageously used for other purposes when not storing attributes.